home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1998 July
/
EnigmA AMIGA RUN 29 (1998)(G.R. Edizioni)(IT)[!][issue 1998-07 & 08].iso
/
recent
/
aminet2.lha
/
JoinMailDE
< prev
next >
Wrap
Text File
|
1997-10-05
|
2KB
|
72 lines
/* $VER: JoinMail.yam 1.2 (05 OCT 97)
** by Charles Patterson <midian@azstarnet.com>
** http://www.azstarnet.com/~midian
**
** Description: This script joins split files into one mail file.
** ftp-mail@uni-paderborn.de version
**
** Requirements: YAM 1.3.4 (© 1995-96 Marcel Beck)
**
** Instructions: Select part 001 of email then start script.
*/
OPTIONS RESULTS
ADDRESS YAM
'GETMAILINFO SUBJECT'
PARSE VAR RESULT filename listing number '/' parts
IF number ~= "1" THEN DO
'REQUEST "Select part 1 then run script." "Ok"'
EXIT
END
'GETMAILINFO FILE'
filename = RESULT
filename = LEFT(filename,LENGTH(FILENAME)-8)||"0001.000"
ext = 48
DO UNTIL ~EXISTS(filename)
ext = ext + 1
filename = LEFT(filename,LENGTH(FILENAME)-1)||D2C(ext)
END
'GETFOLDERINFO MAX'
count = RESULT
filecount = 0
DO x = count-1 to 0 BY -1
'SETMAIL' x
'GETMAILINFO SUBJECT'
PARSE VAR RESULT filenamec listing number '/' partsc
IF filenamec = filename THEN DO
filenum = STRIP(number)
'GETMAILINFO FILENAME'
file.filenum = RESULT
filecount = filecount + 1
END
IF filecount = parts THEN BREAK
END
IF filecount > 0 THEN DO
OPEN('output',fileout,W)
DO x = 1 to filecount
OPEN('input',file.x,R)
IF x > 1 THEN DO
DO UNTIL (LEFT(READLN('input'),5)='begin')
END
END
DO WHILE ~EOF('input')
line = READLN('input')
IF LEFT(line,8) = 'Subject:' THEN
line = 'Subject: Combined'filename
IF STRIP(line) ~= '' & LEFT(line,7) ~= 'include' THEN
WRITELN('output', line)
IF LEFT(line,6)='X-UIDL' & x = 1 THEN
WRITELN('output','')
END
CLOSE('input')
END
CLOSE('output')
'MAILUPDATE'
END